Skip to content

Comments

[eas-cli] Require --environment flag for eas update when SDK >= 55#3418

Open
douglowder wants to merge 4 commits intomainfrom
doug/eng-18944-require-environment-to-be-set-for-eas-update
Open

[eas-cli] Require --environment flag for eas update when SDK >= 55#3418
douglowder wants to merge 4 commits intomainfrom
doug/eng-18944-require-environment-to-be-set-for-eas-update

Conversation

@douglowder
Copy link
Contributor

@douglowder douglowder commented Feb 20, 2026

Why

Problems can occur if an update intended for a development build is published with the environment defaulting to or set to production, and vice versa.

To prevent such problems in the future, this PR makes the --environment flag a required flag for projects using SDK 55 and greater.

How

Add a new utility function to throw an error if sdkVersion does not meet the requirement, and use that function in eas update:configure and eas update.

Skip the check if EAS_BUILD env is set.

Test Plan

Unit tests added.

Testing locally with different projects.

Ensures that server-side environment variables are always explicitly
specified for projects using Expo SDK 55 or greater.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@linear
Copy link

linear bot commented Feb 20, 2026

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@douglowder douglowder marked this pull request as ready for review February 20, 2026 21:27
@github-actions
Copy link

Subscribed to pull request

File Patterns Mentions
packages/eas-cli/src/update/** @wschurman, @quinlanj
packages/eas-cli/src/commands/update/** @wschurman, @quinlanj

Generated by CodeMention

@github-actions
Copy link

✅ Thank you for adding the changelog entry!

@codecov
Copy link

codecov bot commented Feb 21, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.56%. Comparing base (0dcd6d4) to head (c1cb7de).

Files with missing lines Patch % Lines
packages/eas-cli/src/commands/update/configure.ts 50.00% 1 Missing ⚠️
packages/eas-cli/src/update/utils.ts 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3418      +/-   ##
==========================================
+ Coverage   52.54%   52.56%   +0.02%     
==========================================
  Files         806      806              
  Lines       33621    33633      +12     
  Branches     6986     6988       +2     
==========================================
+ Hits        17664    17675      +11     
- Misses      14571    14573       +2     
+ Partials     1386     1385       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant